<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Patient List</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
<div class="page-header" style="margin-bottom:0;color:#158bb8">
    <h1>武汉方舱医院病人管理系统</h1>
</div>

<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<c:url value="/index.html"/>">JavaEE</a>
        </div>
        <div class="collapse navbar-collapse" id="myNavbar">
            <ul class="nav navbar-nav">
                <li>
                    <a href="<c:url value="/index.html"/> ">主页</a>
                </li>
                <li>
                    <a href="<c:url value="/patientlist.html"/>">列表</a>
                </li>
                <li>
                    <a href="<c:url value="/newPatient.html"/> ">新增病人</a>
                </li>
                <li>
                    <a href="<c:url value="/selectPatient.html"/>">查询修改病人</a>
                </li>
                <li class="active">
                    <a href="#">病房一览</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<table class="table table-hover col-sm-10">
    <h2>病人列表，当前为${twardid}病房</h2>
    <a href="<c:url value="/wardList.html"/>">返回</a>
    <thead>
    <tr>
        <th>pno</th>
        <th>name</th>
        <th>sex</th>
        <th>age</th>
        <th>status</th>
        <th>wardId</th>
        <th>bedId</th>
        <th>familyPhone</th>
        <th>更多</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${patients}" var="patient" >
    <tr>
        <td>${patient.pno}</td>
        <td>${patient.name}</td>
        <td>${patient.sex}</td>
        <td>${patient.age}</td>
        <td>${patient.status}</td>
        <td>${patient.wardId}</td>
        <td>${patient.bedId}</td>
        <td>${patient.familyPhone}</td>
        <td onclick="window.location.href='<c:url value="/modifyQuery.html?pno=${patient.pno}"/>'">操作</td>
    </tr>
    </c:forEach>
</table>
</body>

</html>